package com.yuanfengerp.supplierexpense.dao;


import com.yuanfengerp.supplierexpense.model.SupplierExpenseInfo;
import com.yuanfengerp.supplierexpense.model.SupplierExpensesItemsInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface ISupplierExpenseMapper {
    //通过ID删除
    int deleteByPrimaryKey(String supplier_expense_ID);
    //连表新增,新增SupplierExpenseInfo
    int insertSupplierExpenses(SupplierExpenseInfo supplierExpenseInfo);
    //连表新增,新增SupplierExpensesItemsInfo
    int insertSupplierExpensesItems(SupplierExpensesItemsInfo supplierExpensesItemsInfo);
    //根据supplier_expense_ID连表查询
    List<SupplierExpenseInfo> selectSupplierExpenseInfoItems(String supplier_expense_ID);

    //更新
    int updateSupplierExpenseInfo(SupplierExpenseInfo supplierExpenseInfo);
    SupplierExpenseInfo selectSupplierExpenseInfoById(String supplier_expense_ID);
    List<SupplierExpenseInfo> selectAllSupplierExpenseInfo();
    List<SupplierExpenseInfo> selectSupplierExpenseInfo(Map<String, Object> params);
//    获取总数据条数
    Integer getTotalCount(Map<String, Object> params);

}
